package com.travelgroup.domain.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.travelgroup.enums.NotificationType;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import java.time.LocalDateTime;

@Data
@AllArgsConstructor
@NoArgsConstructor
@Schema(description = "消息通知")
public class Notification {
    @TableId(type = IdType.AUTO)
    @Schema(description = "消息主键id")
    private Long id;

    @Schema(description = "用户id")
    private Long userId;

    @Schema(description = "消息标题")
    private String title;

    @Schema(description = "消息内容")
    private String content;

    @Schema(description = "消息类型(0-拼团成功，1-拼团取消，2-系统通知)")
    private NotificationType type;

    @Schema(description = "是否已读")
    @TableField(value = "is_read")
    private Boolean isRead;

    private LocalDateTime createTime;
}
